T
CSharpTest.Net
DebugLocking<T> Class
Members  Example  See Also  Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Synchronization Namespace : DebugLocking<T> Class

Glossary Item Box

Creates a tracking/assertion wrapper around an implementation of an ILockStrategy to verify lock state before and after acquisition and release of both reader and writer locks.

Syntax

Visual Basic (Declaration) 
Public Class DebugLocking(Of T As {New, ILockStrategy}) 
   Inherits DebugLocking
   Implements ILockStrategy 
C# 
public class DebugLocking<T> : DebugLocking, ILockStrategy  
where T: new(), ILockStrategy

Type Parameters

T

Example

Library/Library.Test/LockingTests/TestDebugLocking.cs

C#Copy Code
using (DebugLocking lck = new DebugLocking<IgnoreLocking>())
    Assert.IsFalse(lck.CaptureStack);
using (DebugLocking lck = new DebugLocking<IgnoreLocking>(true, 0, 0, false, 0))
    Assert.IsTrue(lck.CaptureStack);
VB.NETCopy Code
Using lck As DebugLocking = New DebugLocking(Of IgnoreLocking)()
    Assert.IsFalse(lck.CaptureStack)
End Using
Using lck As DebugLocking = New DebugLocking(Of IgnoreLocking)(True, 0, 0, False, 0)
    Assert.IsTrue(lck.CaptureStack)
End Using

Inheritance Hierarchy

System.Object
   CSharpTest.Net.Synchronization.DebugLocking
      CSharpTest.Net.Synchronization.DebugLocking<T>

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys